<template>
	<view class="swiper_box">
		<swiper class="swiper" circular indicator-dots="indicatorDots" autoplay="autoplay" interval="interval" indicator-active-color="#fff"
			duration="duration">
			<swiper-item v-for="(item) in imgList" :key="item.id" class="swiper-item">
				<image :src="item.url" style="width: 100%;height:100%"></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	// import { baseUrl } from '@/tools/request.js'
export default {
	data() {
		return {
			imgList: [
				{
					id: 1,
					url: 'https://img2.baidu.com/it/u=1738681348,1945875603&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500'
				}, {
					id: 2,
					url: 'https://t7.baidu.com/it/u=1732966997,2981886582&fm=193&f=GIF'
				}, {
					id: 3,
					url: 'https://img1.baidu.com/it/u=2345344959,2598464592&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=313'
				},
			],
		}
	},
	mounted() {
		uni.request({
			url: this.$serverUrl + 'apiCarousel/list',
			method: 'GET',
			header: {
				'token': uni.getStorageSync('token')
			},
			success: (res) => {
				console.log('ressssssss', res)
				if (res.data && res.data.length > 0) {
					this.imgList = res.data
				}
			}
		});
	},
	onLoad() {
	},
	onReachBottom() {
	},
	onPullDownRefresh() {
	},
	methods: {}
}
</script>

<style>
.swiper_box {
	width: 100%;
	height: 250px;
}

.swiper {
	width: 100%;
	height: 100%;
}

.swiper-item {
	width: 100%;
	height: 100%;
}
</style>
